using System;
using System.Collections.Generic;
using System.Text;
using System.Configuration;

namespace ca.metaobjects.csogateway.Configuration
{
	internal class ConfigurationProxy
	{
		private static ConfigurationProxy instance;
		internal static ConfigurationProxy Instance
		{
			get
			{
				if (instance == null)
				{
					instance = new ConfigurationProxy();
				}

				return instance;
			}
		}

		private CsoGatewayConfigSection csoGatewayConfig;
		internal CsoGatewayConfigSection CsoGatewayConfig
		{
			get
			{
				return csoGatewayConfig;
			}
		}

		private ConfigurationProxy()
		{
			if (ConfigurationManager.GetSection("CsoGatewayConfigSection") != null)
			{
				csoGatewayConfig = (CsoGatewayConfigSection)ConfigurationManager.GetSection("CsoGatewayConfigSection");
			}
			else
			{
				csoGatewayConfig = new CsoGatewayConfigSection();
				
			}
		}
	}
}
